function sayHi() {
    console.log('hello', this.name);
}
var person2 = {
    name: 'christina',
    sayHi: sayHi,
    a() { console.log('per2', this.name); },


}
var person1 = {
        name: 'Yvettelau',
        friend: person2
    }
    // 当函数作为对象的方法时，this 指向对象，当前对象是person2
var obj = person1.friend;
obj.sayHi();
person1.friend.sayHi();
person1.friend.a();